package com.verisette.ncos.service.accesscontrol.gateway;

import java.util.Map;

import org.corp.agi.common.util.BeanContextFactory;
import org.corp.agi.service.bean.ServiceRequest;
import org.corp.agi.service.bean.ServiceResponse;
import org.corp.agi.service.bean.UserBean;
import org.corp.agi.service.bizprocess.BusinessProcess;

public class CustomAccessControlServiceImpl implements CustomAccessControlService {

	@Override
	public ServiceResponse customLogin(ServiceRequest<Map<String, Object>> request) {
		BusinessProcess process = (BusinessProcess)BeanContextFactory.getBean("loginProcess");
		return process.execute(request);
	}
	
	@Override
	public ServiceResponse<UserBean> customLogout(ServiceRequest<UserBean> request) {
		BusinessProcess process = (BusinessProcess)BeanContextFactory.getBean("logoutProcess");
		return process.execute(request);	
	}
	
	@Override
	public ServiceResponse changePassword(ServiceRequest<Map<String, Object>> request) {
		BusinessProcess process = (BusinessProcess)BeanContextFactory.getBean("changePasswordProcess");
		return process.execute(request);
	}
	
	
/*
	@Override
	public ServiceResponse<UserBean> login(ServiceRequest<UserBean> request) {
		BusinessProcess process = (BusinessProcess)BeanContextFactory.getBean("loginProcess");
		return process.execute(request);	
	}

	@Override
	public ServiceResponse<UserBean> logout(ServiceRequest<UserBean> request) {
		BusinessProcess process = (BusinessProcess)BeanContextFactory.getBean("logoutProcess");
		return process.execute(request);	
	}

	public ServiceResponse insertAccessLog(ServiceRequest<String> request) {
		BusinessProcess process = (BusinessProcess)BeanContextFactory.getBean("insertAccessLogProcess");
		return process.execute(request);	
	}
*/

}
